<html><body>
<form action="" method="post">
    <input type="text" name="inputstr" />
    <input type="submit" name="submit"value="提交" />
</form>
<?php
if (isset($_POST['submit'])){
    $Patternstr = $_POST['inputstr'];
    replaceBig($Patternstr);
}
function replaceBig($str){
    $Pattern=explode("_",$str);
// print_r($Pattern);
    $arr="";
    for($i=0;$i<count($Pattern);$i++){
        $arr=$arr.ucwords($Pattern[$i]);
    }
    echo $arr;
}
?>
</html></body>